<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>修改密码</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <#include "../../include/layui.ftl" />
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-body" pad15>

            <form class="layui-form layui-form-pane" action="/console/user/rewrite/updatePwd" lay-filter="layer-from">
              <div class="layui-form-item">
                <label class="layui-form-label">当前密码</label>
                <div class="layui-input-inline">
                  <input type="password" name="oldPwd" lay-verify="required" autocomplete="off" placeholder="请输入登录密码" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">新密码</label>
                <div class="layui-input-inline">
                  <input type="password" id="newPwd1" name="newPwd1" lay-verify="required" autocomplete="off" placeholder="请输入新密码" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">确认新密码</label>
                <div class="layui-input-inline">
                  <input type="password" name="newPwd" lay-verify="required|pwd" autocomplete="off" placeholder="请再次输入新密码" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item" hidden>
                <div class="layui-input-block">
                  <button id="permissionSubmit" class="layui-btn" lay-submit lay-filter="*">
                    保存
                  </button>
                </div>
              </div>
            </form>
            
          </div>
      </div>
    </div>
  </div>
  <script>
  layui.config({
    base: '${path}/plug-in/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index','form'],function () {
    var form = layui.form,
            $ = layui.$;
    /* 自定义验证规则 */
    form.verify({
      pwd: function(value, item){
        var newPwd1= $("#newPwd1").val();
        if(value != newPwd1) {
          return '两次输入的密码不一致';
        }
      }
    });
  });
  </script>
</body>
</html>